<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
	</head>
	<body>
		
	</body>
	<script type="application/javascript">
		var fn1 = x => x+2;
		alert(fn1(5));
		
		var obj = {'name':'Tom','age':20,'gender':'male',subject:{'names':['html','js']}};
		function printValue(obj){
			//console.log(obj)
			for (var k in obj) {
			  if(typeof obj[k]==='object'){
			  	console.log(k+"-")
			  	 printValue(obj[k]);
			  	 console.log("-")
			  }else{
			  	console.log(k+":"+obj[k])
			  }
			}
		}
		
		printValue(obj);
	</script>
</html>
